﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GzMain.aspx.cs" Inherits="GzMain" %>

<%@ Register Src="UserControls/ucLeftNavigation.ascx" TagName="ucLeftNavigation"
    TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>系统主页面</title>
    <link href="css/base.css" rel="stylesheet">
    <link href="css/platform.css" rel="stylesheet">
    <link rel="stylesheet" href="ScriptFile/custom/uimaker/easyui.css">
</head>
<body>
    <div class="container">
        <div id="pf-hd">
            <div class="pf-logo">
                <img src="images/main/main_logo.png" alt="logo">
            </div>
           <%-- <div class="pf-nav-wrap">
                <div class="pf-nav-ww">
                    <ul class="pf-nav">
                        <li class="pf-nav-item home current" data-menu="sys-manage">
                            <a href="javascript:;">
                                <span class="iconfont">&#xe63f;</span>
                                <span class="pf-nav-title">系统管理</span>
                            </a>
                        </li>
                        <li class="pf-nav-item project" data-menu="org-manage">
                            <a href="javascript:;">
                                <span class="iconfont">&#xe60d;</span>
                                <span class="pf-nav-title">组织管理</span>
                            </a>
                        </li>
                        <li class="pf-nav-item static" data-menu="main-data">
                            <a href="javascript:;">
                                <span class="iconfont">&#xe61e;</span>
                                <span class="pf-nav-title">主数据</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <a href="javascript:;" class="pf-nav-prev disabled iconfont">&#xe606;</a>
                <a href="javascript:;" class="pf-nav-next iconfont">&#xe607;</a>
            </div>--%>

            <div class="pf-user" id="divCenter">
                <div class="pf-user-photo">
                    <img src="images/main/user.png" alt="" />
                </div>

                <span class="pf-user-name ellipsis"><%=UserName%></span>
                <i class="iconfont xiala">&#xe607;</i>

                <div class="pf-user-panel">
                    <ul class="pf-user-opt">
                        <%--<li>ss
                            <a href="javascript:;">
                                <i class="iconfont">&#xe60d;</i>
                                <span class="pf-opt-name">用户信息</span>
                            </a>
                        </li>
                        <li class="pf-modify-pwd">
                            <a href="http://www.uimaker.com">
                                <i class="iconfont">&#xe634;</i>
                                <span class="pf-opt-name">修改密码</span>
                            </a>
                        </li>--%>
                        <li class="pf-logout">
                            <a href="login.aspx">
                                <i class="iconfont">&#xe60e;</i>
                                <span class="pf-opt-name">退出</span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

        </div>

        <div id="pf-bd">
            <%--左侧菜单栏--%>
            <div id="pf-sider">
                <h2 class="pf-model-name">
                    <span class="iconfont">&#xe64a;</span>
                    <span class="pf-name">功能导航</span>
                    <span class="toggle-icon"></span>
                </h2>

                <ul class="sider-nav">
                    <%=strHtml %>
                </ul>

            </div>
            <div id="pf-page">
                <div class="easyui-tabs1" style="width: 100%; height: 100%;">
                    <div title="首页" style="padding: 10px 5px 5px 10px;">
                        <iframe class="page-iframe" src="workbench.aspx" frameborder="no" border="no" height="100%"
                            width="100%" scrolling="auto"></iframe>
                    </div>
                </div>
            </div>
        </div>

        <div id="pf-ft">
            <div class="system-name">
                <i class="iconfont">&#xe6fe;</i>
                <span><%= ConfigurationManager.AppSettings["DefaultSysName"] %></span>
            </div>
            <div class="copyright-name">
                <i class="iconfont">&#xe6ff;</i>
            </div>
        </div>
    </div>

    <script type="text/javascript" src="ScriptFile/jquery.js"></script>
    <script type="text/javascript" src="ScriptFile/custom/jquery.easyui.min.js"></script>
    <!-- <script type="text/javascript" src="js/menu.js"></script> -->
    <script type="text/javascript" src="ScriptFile/easyuiuimaker/main.js"></script>
    <!--[if IE 7]>
      <script type="text/javascript">
        $(window).resize(function(){
          $('#pf-bd').height($(window).height()-76);
        }).resize();
        
      </script>
    <![endif]-->


    <script type="text/javascript">
        function addTab(strUrl, strTitle) {
            var varTemp = $('.easyui-tabs1').tabs("exists", strTitle);
            $(".sider-nav").find("li").removeClass("active");
            $(".sider-nav").find("li[title='" + strTitle + "']").addClass("active");
            if (varTemp == false) {//如果选项卡不存在
                //var strW = $("#divMain").width();
                //var strH = $("#divMain").height();
                //var nW = parseInt(strW) - 25;
                //var nH = parseInt(strH) - 25;

                $('.easyui-tabs1').tabs('add', {
                    title: strTitle,
                    content: '<iframe src="' + strUrl + '" width="99%" height="99%" frameboder="0" id="' + strTitle + '"></iframe>',
                    iconCls: 'icon-save',
                    closable: true
                });

                //为子框架添加加载事件
                $("#" + strTitle).load(function () {
                    //  HideLoading();
                });
            }
            else {//如果已经存在则选中对应的选项卡并刷新
                if (strUrl.indexOf("?") > 0) {
                    strUrl += "&rdm=" + Math.random();
                }
                else {
                    strUrl += "?rdm=" + Math.random();
                }
                $("#" + strTitle + "").attr("src", strUrl);
                $('.easyui-tabs1').tabs('select', strTitle);

                //再关闭一次
                // HideLoading();
            }
        }
        $('.easyui-tabs1').tabs({
            tabHeight: 44,
            onSelect: function (title, index) {
                var currentTab = $('.easyui-tabs1').tabs("getSelected");
                if (currentTab.find("iframe") && currentTab.find("iframe").size()) {
                    currentTab.find("iframe").attr("src", currentTab.find("iframe").attr("src"));
                }
            }
        })
        $(window).resize(function () {
            $('.tabs-panels').height($("#pf-page").height() - 46);
            $('.panel-body').height($("#pf-page").height() - 76)
        }).resize();

        var page = 0,
            pages = ($('.pf-nav').height() / 70) - 1;

        if (pages === 0) {
            $('.pf-nav-prev,.pf-nav-next').hide();
        }
        $(document).on('click', '.pf-nav-prev,.pf-nav-next', function () {


            if ($(this).hasClass('disabled')) return;
            if ($(this).hasClass('pf-nav-next')) {
                page++;
                $('.pf-nav').stop().animate({ 'margin-top': -70 * page }, 200);
                if (page == pages) {
                    $(this).addClass('disabled');
                    $('.pf-nav-prev').removeClass('disabled');
                } else {
                    $('.pf-nav-prev').removeClass('disabled');
                }

            } else {
                page--;
                $('.pf-nav').stop().animate({ 'margin-top': -70 * page }, 200);
                if (page == 0) {
                    $(this).addClass('disabled');
                    $('.pf-nav-next').removeClass('disabled');
                } else {
                    $('.pf-nav-next').removeClass('disabled');
                }

            }
        })

        // setTimeout(function(){
        //    $('.tabs-panels').height($("#pf-page").height()-46);
        //    $('.panel-body').height($("#pf-page").height()-76)
        // }, 200)
    </script>
</body>
</html>
